'use strict';
var express = require('express');
var mongo = require('mongoskin')

var db = mongo.db("mongodb://localhost:27017/users");
db.bind('users');

function insert (data) {
	db.users.insert(data);	
}

function find (username) {
	var query =  new Promise((db.users.find(
		{
			username:username
		}
	);
	return data;
}
function update (username) {
	// TODO update userinfo
}